A Resumption Monad Transformer and its Applications in the Semantics of Concurrency
نویسنده
چکیده
Resumptions are a valuable tool in the analysis and design of semantic models for concurrent programming languages, in which computations consist of sequences of atomic steps that may be interleaved. In this paper we consider a general notion of resumption, parameterized by the kind of computations that take place in the atomic steps. We define a monad transformer which, given a monad M that represents the atomic computations, constructs a monadR(M) for interleaved computations. Moreover, we use this monad transformer to define the denotational semantics of a simple imperative language supporting nondeterminism and concurrency.
منابع مشابه
On the Semantics of a Concurrency Monadwith
We develop two semantics for the concurrency monad of the purely functional language Opal, which provides a general monadic choice, value-result agents and guarded client-server based communication. The transition semantics supports an operational understanding of the concurrency monad. The state-transformer semantics gives an axiomatic description of the concurrency monad by using a variant of...
متن کاملTowards a Denotational Semantics for Concurrent State Transformers
Concurrent state transformers are an extension of state transformers investigated by Launchbury, Peyton Jones, Wadler, and others by concurrency primitives. A denotational semantics for state transformers executing in parallel is deened using standard domain theoretic techniques. Using the semantics it is proved that concurrent state transformers still form a monad and that the concurrent seman...
متن کاملThe Essence of Multitasking
This article demonstrates how a powerful and expressive abstraction from concurrency theory—monads of resumptions—plays a dual rôle as a programming tool for concurrent applications. The article demonstrates how a wide variety of typical OS behaviors may be specified in terms of resumption monads known heretofore exclusively in the literature of programming language semantics. We illustrate the...
متن کاملCheap (But Functional) Threads
This article demonstrates how a powerful and expressive abstraction from concurrency theory plays a dual rôle as a programming tool for concurrent applications and as a foundation for their verification. This abstraction—monads of resumptions expressed using monad transformers—is cheap: it is easy to understand, easy to implement, and easy to reason about. We illustrate the expressiveness of th...
متن کاملAxiomatic Constructor Classes in Isabelle/HOLCF
We have definitionally extended Isabelle/HOLCF to support axiomatic Haskell-style constructor classes. We have subsequently defined the functor and monad classes, together with their laws, and implemented state and resumption monad transformers as generic constructor class instances. This is a step towards our goal of giving modular denotational semantics for concurrent lazy functional programm...
متن کامل